package scenic.testspring;

import scenic.testspring.beans.User;

/**
 * Created by scenic on 2017/11/9.
 */
public class UserService {
    //这里就是面向抽象编程
    private UserDAO userDAO ;

    public void add(User usr) {
        //可以做一些验证
        //可以做一些其他的事情
        userDAO.save(usr);
    }

    public void setUserDAO(UserDAO userDAO) {
        this.userDAO = userDAO;
    }
}
